
class UrlMappings {

	static mappings = {
		
		"/rest/$controller/$id?"(parseRequest:true) {
			action = [GET: "show", DELETE: "delete", PUT: "update", POST: "save"]
		}
		
		"/$controller/$action?/$id?"{
			constraints {
				// apply constraints here
			}
		}

		"/" {
			controller = 'redirect'
			destination = '/login'
		}
		
		"/app"(controller:"app")
		
		"500"(controller:'app', action: "error")
		"401"(controller: 'app', action: 'handleStatus')
		"405"(controller: 'app', action: 'handleStatus')
	}
}		
